<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title></title>
    <link href="libs/weui/weuix.min.css" rel="stylesheet" />
    <link href="libs/swipe/swiper.min.css" rel="stylesheet" />
    <link href="css/common.css" rel="stylesheet"/>
    <link href="css/product.css" rel="stylesheet"/>
</head>
<body class="page-bg">
    <div class="weui_tab tab-bottom">
        <div class="weui_btn_warn weui-header ">
            <div class="weui-header-left"> <a href="javascript:window.history.go(-1);" class="icon icon-109 f-white"></a>  </div>
            <h1 class="weui-header-title">便民买卖</h1>
        </div>
        <input type="hidden" id="id" value="" />
        <div class="weui_tab_bd">
            <div class="product_detail"></div>
            <div class="messages"></div>

        </div>
        <div class="weui_tabbar detail-nav">
            <a href="javascript:;" class="weui_tabbar_item weui-border-r" id="addfavorite">
                <div class="weui_tabbar_icon">
                    <i class="icon icon-fav"></i>
                </div>
                <p class="weui_tabbar_label">收藏</p>
            </a>
            <a href="javascript:;" class="weui_tabbar_item weui-border-r" id="livemessage">
                <div class="weui_tabbar_icon">
                    <i class="icon icon-message"></i>
                </div>
                <p class="weui_tabbar_label">留言</p>
            </a>
            <a  class="weui_tabbar_item" id="contact_phone">
                <div class="weui_tabbar_icon">
                    <i class="icon icon-call"></i>
                </div>
                <p class="weui_tabbar_label">联络卖家</p>
            </a>
        </div>
        <div class="weui_tabbar">
            <div class="weui-flex">
                <div class="weui-flex-item">

                </div>
            </div>
        </div>
    </div>
</body>
<script type="text/html" id="detail_tpl">
    <div id="slider">
        <div class="m-wraper">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    {{each result.images value i}}
                    <div class="swiper-slide"><img src="{{result.images[i].originUrl}}" alt=""/></div>
                    {{/each}}
                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
    </div>
    <div class="product-title">
        <p><span class="type">{{result.categoryName}}-{{result.type==1?"商家":"个人"}}</span><span class="price">￥{{result.price}}</span></p>
        <p class="title-text">{{result.desc}}</p>
        {{if result.isFavorite == 1}}<input type="hidden" id="isFavorite" value="1" />{{else}}<input type="hidden" id="isFavorite" value="0" />{{/if}}
    </div>
    <div class="contact">
        <div class="weui_cells weui_cells_access">
            <a class="weui_cell " href="{{result.user.shopUrl}}">
                <div class="weui-avatar-circle"><img class="weui-avatar-url" src="{{result.user.avatar}}" alt=""/></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p><i class="icon icon-user"></i>{{result.user.name}}
                        {{if result.user.phoneNum}}
                        <span class="r2"><i class="icon icon-phone"></i>手机认证</span>
                        {{/if}}
                    </p>
                    <p>
                        <!--0打回 1待认证 2认证-->
                        {{if result.user.idVerifyStatus == 2}}
                        <span class="r1"><i class="icon icon-smile"></i>实名认证</span>
                        {{/if}}
                        {{if result.user.isBusiness == 1}} <!--0 没认证-->
                        <span><i class="icon icon-shop-verify"></i>商家认证</span></p>
                        {{/if}}
                </div>
                {{if result.user.shopUrl}}
                <div class="weui_cell_ft"><i class="icon icon-shop"></i>我的网店</div>
                {{/if}}
            </a>
        </div>
    </div>
</script>
<script type="text/html" id="comments_tpl">
    <div class="title">留言<span>({{result.length}})</span></div>
    <div class="mes-con">
        {{if result.length>0}}
            {{each result value i}}
            <div class="mes-item">
                <div class="hd">
                    <div class="weui-avatar-circle"><img class="weui-avatar-url" data-img="{{result[i].avatar}}" src="{{result[i].avatar}}" alt=""/></div>
                    <span class="name">{{result[i].userName}}</span>
                    <span class="time">{{result[i].createdTime | dateFormat 'yyyy-MM-dd'}}</span>
                </div>
                <div class="bd">
                    {{result[i].message}}
                </div>
            </div>
            {{/each}}
        {{else}}
            <div class="nodata">暂无留言</div>
        {{/if}}
    </div>
</script>
<script type="text/javascript" src="libs/zepto/zepto.min.js"></script>
<script type="text/javascript" src="libs/zepto/zepto.cookie.min.js"></script>
<script type="text/javascript" src="libs/swipe/swiper.min.js"></script>
<script type="text/javascript" src="libs/artTemplate/template.js"></script>
<script type="text/javascript" src="components/template.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="components/detail.js"></script>
</html>